import request from '@/utils/request.js'

// 查询预警阈值列表
export function listThreshold(query) {
  return request({
    url: '/slope.warning/threshold/list',
    method: 'get',
    params: query
  })
}

// 查询预警阈值详细
export function getThreshold(id) {
  return request({
    url: '/slope.warning/threshold/' + id,
    method: 'get'
  })
}

// 新增预警阈值
export function addThreshold(data) {
  return request({
    url: '/slope.warning/threshold',
    method: 'post',
    data: data
  })
}

// 修改预警阈值
export function updateThreshold(data) {
  return request({
    url: '/slope.warning/threshold',
    method: 'put',
    data: data
  })
}

// 删除预警阈值
export function delThreshold(id) {
  return request({
    url: '/slope.warning/threshold/' + id,
    method: 'delete'
  })
}
